import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
const routes = [{
    path: '/zlx',
    component: () => import('../views/personal/index.vue'),
    redirect: "/zlx/gaishu",
    children: [{
        path: '/zlx/gaishu',
        component: () => import('../views/personal/gaikuang/gaikuang.vue'),
    }, {
        path: '/zlx/caipu',
        component: () => import("../views/personal/caipu/caipu.vue"),
    }, {
        path: '/zlx/zuopin',
        component: () => import("../views/personal/zuopin/zuopin.vue"),
    }, {
        path: '/zlx/star',
        component: () => import("../views/personal/star/star.vue"),
    }, {
        path: '/zlx/fans',
        component: () => import("../views/personal/fans/fans.vue"),
    },
    ]
},
{
    path: '/zlxinfo',
    component: () => import('../views/personal/personalinfo.vue'),
    redirect: "/zlxinfo/email",
    children: [{
        path: '/zlxinfo/basicinfo',
        component: () => import('../views/personal/basicinfo/basicinfo.vue'),
    }, {
        path: '/zlxinfo/touxiang',
        component: () => import('../views/personal/touxiang/touxiang.vue'),
    }, {
        path: '/zlxinfo/email',
        component: () => import('../views/personal/email/email.vue'),
    }],
},

{
    path: '/',
    component: () =>
        import("../views/zzt/zzt.vue")
},
{
    path: '/zzt',
    component: () =>
        import("../views/zzt/zzt.vue")
},

{
    // dzf 作品动态 
    path: '/dongtai',
    name: 'DongTai',
    component: () =>
        import('../views/dongtai/DongTai.vue'),
},
{
    // dzf 注册页面
    path: '/register',
    name: 'Register',
    component: () =>
        import('../views/register/Register.vue'),
},
{
    // dzf 登录模块
    path: '/login',
    name: 'Login',
    component: () =>
        import('../views/login/Login.vue'),
},
{
    //wxw
    path: "/menudetail/:cookid",
    component: () => import("@/views/menudetail/MenuDetail.vue"),
},
{
    //wxw2
    path: "/uploadopus/:cookid",
    component: () => import("@/views/menudetail/Uploadopus.vue"),
},
{
    // hxs1
    path: '/qhxsfirst',
    name: 'Hxsfirst',
    component: () => import('../views/hxs/Hxsfirst.vue')
},
{
    // hxs2
    path: '/phxsecond',
    name: 'Hxsfirst',
    component: () => import('../views/hxs/Hxssecond.vue')
},


{
    //ly
    path: '/caidan',
    name: 'caidan',
    component: () =>
        import('../views/ly/caidan.vue'),
    children: [{
        path: 'liuxingcaidan',
        component: () =>
            import('../views/ly/fenlei/fenleicenter.vue')
    }, {
        path: 'centerpop',
        component: () =>
            import('../views/ly/fenlei/fenleicenter1.vue')
    },
    {
        path: 'centernew',
        component: () =>
            import('../views/ly/fenlei/fenleicenter2.vue')
    },
    {
        path: 'centercf101',
        component: () =>
            import('../views/ly/fenlei/fenleicenter4.vue')
    },
    {
        path: 'centertop',
        component: () =>
            import('../views/ly/fenlei/fenleicenter3.vue')
    }, {
        path: 'centeryuedu',
        component: () =>
            import('../views/ly/fenlei/fenleicenter5.vue')
    }]
},

//zhh
{

    path: '/caidanfenlei',
    name: 'caidanfenlei',
    component: () => import('../views/zhh/caidanfenlei.vue')
},


{   //ly2
    path: '/caidanCaixi/:zhhid',
    name: 'caidanCaixi',
    component: () =>
        import('../views/ly/caidanCaixi.vue'),
}]
const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})
router.afterEach((to, from) => {
    window.scrollTo(0, 0)
})

export default router